function changFace(){
    var reader = new FileReader();//定义文件读取流对象
    reader.readAsDataURL($("fileTxt").files[0]);
    reader.onload = function (ev) {
        $("faceImg").src = ev.target.result;
    }
}
async function add(){
    var formObj=new FormData();
    formObj.append("uploadImg",$("fileTxt").files[0]);
    let config = {
        headers: {'Content-Type': 'multipart/form-data' }
    }
    var  uploadFileName;
    //向服务器上传文件，得到上传文件名
    await axios.post("/upload",formObj,config).then(resp=>{
        uploadFileName=resp.data;
    });
    // alert(uploadFileName);
    console.log("ahahahah")
    axios.get("/user/signin",{
        params: {
            name:$("nameTxt").value,
            pwd:$("pwdTxt").value,
            Email:$("emTxt").value,
            imgPath:uploadFileName
        }
    }).then(resp=>{
        var info=resp.data;
        console.log(info)
        if (info=="ok"){
            location.href="/login.html"
        }
    })
}
